import { action, configure, observable } from 'mobx';

configure({
    enforceActions: 'always'
})

class Store {
    @observable showLoading =false;
    @observable isDebug =false;

    @action.bound
    setValue(keys, data) {
        this[keys] = data
    }

    @action.bound
    startFetch() {
        this.showLoading = true;
    }

    @action.bound
    finishFetch() {
        this.showLoading = false;
    }
}

const appStore = new Store();
export default appStore
